home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / john / hc_quick.hqx / Quick Compacter™ 1.0.2 / card_2975.txt < prev    next >
Encoding:
Text File  |  1989-11-15  |  35.3 KB  |  1,220 lines

  1. -- card: 2975 from stack: in.2
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2588
  5. -- name: Main Prog
  6. ----- HyperTalk script -----
  7. -----------------------------------------------------------------------
  8. ----This script updates the cursor, which is sometimes left an arrow
  9. ----after the Filename XCMD is done. Also updates the QC Size and
  10. ----Freespace boxes in the Main Card.
  11. -----------------------------------------------------------------------
  12. on MouseWithin
  13.   choose browse tool
  14.   put the freeSize of this stack into cd fld "Wasted"
  15.   put the Size of this stack into cd fld "STSize"
  16. end MouseWithin
  17.  
  18.  
  19.  
  20.  
  21. -- part 4 (field)
  22. -- low flags: 01
  23. -- high flags: 4007
  24. -- rect: left=2 top=67 right=283 bottom=274
  25. -- title width / last selected line: 0
  26. -- icon id / first selected line: 0 / 0
  27. -- text alignment: 0
  28. -- font id: 3
  29. -- text size: 9
  30. -- style flags: 0
  31. -- line height: 12
  32. -- part name: Title
  33.  
  34.  
  35. -- part 15 (field)
  36. -- low flags: 01
  37. -- high flags: 0002
  38. -- rect: left=257 top=284 right=302 bottom=354
  39. -- title width / last selected line: 0
  40. -- icon id / first selected line: 0 / 0
  41. -- text alignment: 0
  42. -- font id: 0
  43. -- text size: 12
  44. -- style flags: 0
  45. -- line height: 16
  46. -- part name: totsavings
  47.  
  48.  
  49. -- part 21 (field)
  50. -- low flags: 01
  51. -- high flags: 0002
  52. -- rect: left=2 top=304 right=340 bottom=393
  53. -- title width / last selected line: 0
  54. -- icon id / first selected line: 0 / 0
  55. -- text alignment: 1
  56. -- font id: 3
  57. -- text size: 9
  58. -- style flags: 0
  59. -- line height: 12
  60. -- part name: Data Line
  61.  
  62.  
  63. -- part 23 (field)
  64. -- low flags: 01
  65. -- high flags: 0002
  66. -- rect: left=2 top=52 right=67 bottom=258
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 0 / 0
  69. -- text alignment: 1
  70. -- font id: 0
  71. -- text size: 12
  72. -- style flags: 0
  73. -- line height: 16
  74. -- part name: TitleBar
  75.  
  76.  
  77. -- part 24 (field)
  78. -- low flags: 01
  79. -- high flags: 0004
  80. -- rect: left=2 top=32 right=51 bottom=413
  81. -- title width / last selected line: 0
  82. -- icon id / first selected line: 0 / 0
  83. -- text alignment: 1
  84. -- font id: 3
  85. -- text size: 12
  86. -- style flags: 256
  87. -- line height: 16
  88. -- part name: TitleReport
  89.  
  90.  
  91. -- part 25 (field)
  92. -- low flags: 01
  93. -- high flags: 0007
  94. -- rect: left=257 top=67 right=283 bottom=369
  95. -- title width / last selected line: 0
  96. -- icon id / first selected line: 0 / 0
  97. -- text alignment: 65535
  98. -- font id: 3
  99. -- text size: 9
  100. -- style flags: 0
  101. -- line height: 12
  102. -- part name: BSaved
  103.  
  104.  
  105. -- part 35 (field)
  106. -- low flags: 81
  107. -- high flags: 0002
  108. -- rect: left=1 top=212 right=228 bottom=19
  109. -- title width / last selected line: 0
  110. -- icon id / first selected line: 0 / 0
  111. -- text alignment: 0
  112. -- font id: 3
  113. -- text size: 12
  114. -- style flags: 0
  115. -- line height: 16
  116. -- part name: MultCheck
  117.  
  118.  
  119. -- part 39 (field)
  120. -- low flags: 01
  121. -- high flags: 0002
  122. -- rect: left=257 top=52 right=67 bottom=353
  123. -- title width / last selected line: 0
  124. -- icon id / first selected line: 0 / 0
  125. -- text alignment: 1
  126. -- font id: 0
  127. -- text size: 12
  128. -- style flags: 0
  129. -- line height: 16
  130. -- part name: TITLE BAR 2
  131.  
  132.  
  133. -- part 41 (button)
  134. -- low flags: 00
  135. -- high flags: A004
  136. -- rect: left=417 top=56 right=78 bottom=508
  137. -- title width / last selected line: 0
  138. -- icon id / first selected line: 0 / 0
  139. -- text alignment: 1
  140. -- font id: 0
  141. -- text size: 12
  142. -- style flags: 0
  143. -- line height: 16
  144. -- part name: Options
  145. ----- HyperTalk script -----
  146. on mouseDown
  147.   put "Go Home" into menu
  148.   put Return & "Finder,Quit HyperCard,(-,Restart,Shut Down" after menu
  149.   put Return & "Open Stack..." after menu
  150.   put Return & "Transfer..." after menu
  151.   Put Return & "(-" after Menu
  152.   put Return & "Compact This Stack" after menu
  153.   Put Return & "Clear Report Fields" after menu
  154.   Put Return & "(-" after Menu
  155.   put Return & "Insert HomeCompact script" after menu
  156.   put Return & "Remove HomeCompact script" after menu
  157.   Get HPopupMenu(menu,0,The MouseV-10,The MouseH-75)
  158.   set hilite of cd btn id 41 to false
  159.   if item 1 of it=1 then Domenu "Home"
  160.   if item 1 of it=2 then
  161.     if item 2 of it=2 then
  162.       Domenu "Quit HyperCard"
  163.       exit MouseDown
  164.     end if
  165.     if item 2 of it=4 then
  166.       answer "Do not Restart under Multifinder." with "Restart" or "Cancel"
  167.       if it="Cancel" then exit MouseDown
  168.       DORESTART -- This patches ExitToShell
  169.       domenu "quit hypercard" -- This now shuts down the Mac
  170.     end if
  171.     if item 2 of it=5 then
  172.       answer "Do not Shut Down under Multifinder." with "Shut Down" or "Cancel"
  173.       if it="Cancel" then exit MouseDown
  174.       DOSHUTDOWN -- This patches ExitToShell
  175.       domenu "quit hypercard" -- This now restarts the Mac
  176.     end if
  177.   end if
  178.   if item 1 of it=3 then Domenu "Open Stack..."
  179.   if item 1 of it=4 then
  180.     put "Transfer to which application?"
  181.     Get FileName("APPL")
  182.     hide msg
  183.     if it=empty then exit mouseDown
  184.     open it
  185.   end if
  186.   if item 1 of it=6 then
  187.     put empty into cd fld "Hello!"
  188.     put the freesize of this stack into a
  189.     put the number of chars of a into c
  190.     put a into Cb
  191.     if c>3 then
  192.       put char c-3 of Cb into temp
  193.       put temp&"," into char c-3 of Cb
  194.     end if
  195.     if a>0 then
  196.       put "Attempting to compact"&&Cb&&"bytes in Quick CompacterΓäó."
  197.       domenu "Compact Stack"
  198.       put the freeSize of this stack into cd fld "Wasted"
  199.       put the Size of this stack into cd fld "STSize"
  200.     else
  201.       put "Not necessary to compact Quick CompacterΓäó at this time."
  202.       wait 60 ticks
  203.     end if
  204.   end if
  205.   if item 1 of it=7 then ClrFlds
  206.   if item 1 of it=9 then HomeComIns
  207.   if item 1 of it=10 then HomeComRem
  208.   hide msg
  209. end mouseDown
  210. ------------------------Insert Home Compact Script--------------------
  211. on HomeComIns
  212.   global nmQC,alpha,HomeScript,chk1,chk2
  213.   put empty into alpha
  214.   put empty into cd fld "Hello!"
  215.   put "Checking for HomeCompactΓäó script in your home stack."
  216.   put cd fld "HomeCompactΓäó Script" into HomeScript
  217.   set cursor to busy
  218.   lock screen
  219.   set lockmessages to true
  220.   push card
  221.   go home
  222.   put the script of stack "home" into alpha
  223.   if "Quick CompacterΓäó" is in alpha and "HomeCompactΓäó Script" is not in alpha
  224.   then
  225.   Answer "HomeCompactΓäó version 1.0 is installed." with "Upgrade" or "Leave it"
  226.   if it="Upgrade"
  227.   then
  228.   put "Deleting version 1.0 of HomeCompactΓäó script."
  229.   put "The following is a script inserted by Quick CompacterΓäó." into chk1
  230.   put "end MouseStillDown" into chk2
  231.   dold
  232.   put cd fld "Hello!" into alpha
  233.   go home
  234.   install
  235. end if
  236. else
  237.   if "---QCHCStart101" is not in alpha
  238.   then
  239.   install
  240. else
  241.   answer "HomeCompactΓäó 1.0.1 is already installed." with "Cancel"
  242. end if
  243. end if
  244. pop card
  245. unlock screen
  246. wait 60 ticks
  247. set lockmessages to false
  248. end HomeComIns
  249. ------------------Delete old Home Compact Script------------------------
  250. on dold
  251.   global nmQC,alpha,chk1,chk2
  252.   go to nmQC
  253.   put empty into c
  254.   put empty into d
  255.   put alpha into cd fld "Hello!"
  256.   put the number of lines in cd fld "Hello!" into z
  257.   repeat with i=1 to z
  258.     if chk1 is in line i of cd fld "Hello!" then put i into c
  259.     if chk2 is in line i of cd fld "Hello!" then put i into d
  260.     if d=i then exit repeat
  261.     set cursor to busy
  262.   end repeat
  263.   if c is empty and d is not empty
  264.   then
  265.   answer "Error in removing script. Sorry." with "Cancel"
  266.   exit dold
  267. end if
  268. repeat with j=d down to c
  269.   delete line j of cd fld "Hello!"
  270.   set cursor to busy
  271. end repeat
  272. hide msg
  273. end dold
  274. ---------------------Actually install the script here-------------------
  275. on install
  276.   global alpha,HomeScript
  277.   put "Installing HomeCompactΓäó script in you Home stack."
  278.   put return & HomeScript after alpha
  279.   set the script of stack "home" to alpha
  280.   put "Compacting Home Stack"
  281.   domenu "Compact Stack"
  282.   put "HomeCompactΓäó script is now installed in your Home stack."
  283. end install
  284. ------------------------Remove HomeCompact Script-----------------------
  285. on HomeComRem
  286.   global nmQC,alpha,chk1,chk2
  287.   put empty into alpha
  288.   put empty into cd fld "Hello!"
  289.   put "Checking for HomeCompactΓäó script in your home stack."
  290.   set cursor to busy
  291.   lock screen
  292.   set lockmessages to true
  293.   push card
  294.   go home
  295.   put the script of stack "home" into alpha
  296.   go nmQC
  297.   if "---QCHCStart101" is in alpha
  298.   then
  299.   put "Removing version 1.0.1 of HomeCompactΓäó Script."
  300.   put "---QCHCStart101" into chk1
  301.   put "---QCHCEnd" into chk2
  302. else
  303.   put "Removing version 1.0 of HomeCompactΓäó Script."
  304.   put "The following is a script inserted by Quick CompacterΓäó." into chk1
  305.   put "end MouseStillDown" into chk2
  306. end if
  307. dold
  308. put cd fld "Hello!" into alpha
  309. go home
  310. set the script of stack "home" to alpha
  311. put "Compacting Home Stack"
  312. domenu "Compact Stack"
  313. put "Finished removing HomeCompactΓäó Script from your Home Stack."
  314. go nmQC
  315. put empty into cd fld "Hello!"
  316. hide msg
  317. unlock screen
  318. set lockmessages to false
  319. end HomeComRem
  320. --------------------Clear the report fields-----------------------------
  321. on ClrFlds
  322.   global totsav,cur
  323.   hide msg
  324.   hide menubar
  325.   answer "Clear the report fields?" with "Yes" or "Cancel"
  326.   if it="Cancel" then exit ClrFlds
  327.   set cursor to watch
  328.   put empty into cd fld "Title"
  329.   put empty into cd fld "BSaved"
  330.   put empty into cd fld "Persaved"
  331.   put 0 into cur
  332.   put 0 into totsav
  333.   put 0 into cd fld "Totsavings"
  334. end ClrFlds
  335.  
  336.  
  337. -- part 42 (button)
  338. -- low flags: 00
  339. -- high flags: A004
  340. -- rect: left=417 top=80 right=102 bottom=508
  341. -- title width / last selected line: 0
  342. -- icon id / first selected line: 0 / 0
  343. -- text alignment: 1
  344. -- font id: 0
  345. -- text size: 12
  346. -- style flags: 0
  347. -- line height: 16
  348. -- part name: Help
  349. ----- HyperTalk script -----
  350. on mouseDown
  351.   global shs
  352.   put "Program Info" into menu
  353.   put Return & "Help File" after menu
  354.   put Return & "HomeCompact" after menu
  355.   put Return & "Credits" after menu
  356.   put Return & "Version History" after menu
  357.   Get HPopupMenu(menu,0,The MouseV-10,The MouseH-75)
  358.   set hilite of cd btn id 42 to false
  359.   if item 1 of it=1 then
  360.     hide msg
  361.     hide menubar
  362.     put "Program Info" into shs
  363.     set lockscreen to true
  364.     show cd fld shs
  365.     show cd btn id 37
  366.     set hilite of cd btn id 37 to true
  367.     Unlock screen with visual effect iris open slow
  368.   end if
  369.   if item 1 of it=2 then
  370.     hide msg
  371.     hide menubar
  372.     put "Help File" into shs
  373.     set lockscreen to true
  374.     show cd fld shs
  375.     set hilite of cd btn id 37 to true
  376.     show cd btn id 37
  377.     Unlock screen with visual effect iris open slow
  378.   end if
  379.   if item 1 of it=3 then
  380.     hide msg
  381.     hide menubar
  382.     put "HomeCompact" into shs
  383.     set lockscreen to true
  384.     show cd fld shs
  385.     show cd btn id 37
  386.     set hilite of cd btn id 37 to true
  387.     Unlock screen with visual effect iris open slow
  388.   end if
  389.   if item 1 of it=4 then
  390.     hide msg
  391.     hide menubar
  392.     put "Credits" into shs
  393.     set lockscreen to true
  394.     show cd fld shs
  395.     set hilite of cd btn id 37 to true
  396.     show cd btn id 37
  397.     Unlock screen with visual effect iris open slow
  398.   end if
  399.   if item 1 of it=5 then
  400.     hide msg
  401.     hide menubar
  402.     put "Version History" into shs
  403.     set lockscreen to true
  404.     show cd fld shs
  405.     set hilite of cd btn id 37 to true
  406.     show cd btn id 37
  407.     Unlock screen with visual effect iris open slow
  408.   end if
  409. end MouseDown
  410.  
  411.  
  412. -- part 43 (button)
  413. -- low flags: 00
  414. -- high flags: A004
  415. -- rect: left=417 top=32 right=54 bottom=508
  416. -- title width / last selected line: 0
  417. -- icon id / first selected line: 0 / 0
  418. -- text alignment: 1
  419. -- font id: 0
  420. -- text size: 12
  421. -- style flags: 0
  422. -- line height: 16
  423. -- part name: Compact
  424. ----- HyperTalk script -----
  425. on mouseDown
  426.   global QL,QLvar
  427.   put "One Stack" into menu
  428.   put Return & "Multiple Stacks" after menu
  429.   put Return & "Entire Folder" after menu
  430.   put the number of lines in cd fld "QuickList" into a
  431.   put return & "Quick Compact List" after menu
  432.   if QLvar is empty then
  433.     repeat with i=1 to a
  434.       put "," & item 2 of line i of cd fld "QuickList" after QLvar
  435.     end repeat
  436.     if QLvar is empty then put ",None installed" into QLvar
  437.   end if
  438.   if QLvarΓëá",None installed" then
  439.     put ",Compact entire list," after menu
  440.     put "-(" after menu
  441.   end if
  442.   put QLvar after menu
  443.   Get HPopupMenu(menu,0,The MouseV-10,The MouseH-75)
  444.   set hilite of cd btn id 43 to false
  445.   if item 1 of it=1 then ComOneStack
  446.   if item 1 of it=2 then ComMultStack
  447.   if item 1 of it=3 then ComEntFldr
  448.   if item 1 of it=4 then
  449.     put item 2 of it into QL
  450.     ComQuickLst
  451.   end if
  452.   wait 60 ticks
  453.   put CleanUp into temp
  454. end mouseDown
  455. -------------------------Compact One Stack-----------------------------
  456. on ComOneStack
  457.   global tst,Numb,TotNumb,ComStatus
  458.   put 1 into tst
  459.   put 1 into Numb
  460.   put 1 into TotNumb
  461.   put 1 into cd fld "MultCheck"
  462.   put "S" into ComStatus
  463.   DoIt
  464. end ComOneStack
  465. ------------------------------Compact Multiple Stacks------------------
  466. on ComMultStack
  467.   global tst,nmQC,Numb,TotNumb,ComStatus
  468.   ask "How many files to compact?" with "1000"
  469.   if it=empty then exit ComMultStack
  470.   put "Mult" into ComStatus
  471.   put it into ad
  472.   put 1 into cd fld "MultCheck"
  473.   put 0 into tst
  474.   repeat with i=1 to ad
  475.     if tst=1 then exit repeat
  476.     set cursor to watch
  477.     put i into Numb
  478.     put ad into TotNumb
  479.     Doit
  480.   end repeat
  481.   put empty into Numb
  482.   put empty into TotNumb
  483.   put empty into tst
  484.   if ad=i then answer "The run is complete." with "OK"
  485. end ComMultStack
  486. --------------------Compact Entire Folder-------------------------------
  487. on ComEntFldr
  488.   global Multcnt,StackPath,ComStatus,Etst
  489.   Put "Select a stack and all stacks in that folder will be compacted."
  490.   Put FileName("STAK") into Path
  491.   set lockscreen to true   -----these two lines will reset the screen
  492.   set lockscreen to false  -----so that the outline disappears
  493.   if Path=empty then exit ComEntFldr
  494.   put number of chars of Path into z
  495.   put empty into cd fld "Hello!"
  496.   repeat with i=z down to 1
  497.     if char i of Path is not ":" then delete char i of Path else exit repeat
  498.   end repeat
  499.   Put Files(Path,"STAK") into liststacks
  500.   put liststacks into cd fld "Hello!"
  501.   put 1 into cd fld "MultCheck"
  502.   put 0 into Multcnt
  503.   put the number of lines in cd fld "Hello!" into NumStks
  504.   put "ENTFLDR" into ComStatus
  505.   set cursor to watch
  506.   put 0 into Etst
  507.   repeat with i=1 to NumStks
  508.     put line i of cd fld "Hello!" into StackName
  509.     put Path&StackName into StackPath
  510.     Doit
  511.     if Etst=1 then exit repeat
  512.   end repeat
  513.   put empty into StackPath
  514.   put "Folder Compaction done. Compacted"&&Multcnt&&"out of"&&i&&"in the folder." into msg
  515. end ComEntFldr
  516. -------------------Compact Quick List Item or All-----------------------
  517. on ComQuickLst
  518.   global QL,StackPath,ComStatus,QLSTKName,QLtst
  519.   set cursor to watch
  520.   put the number of lines in cd fld "QuickList" into NL
  521.   if NL=0 then
  522.     put "There is nothing to compact!"
  523.     exit ComQuickLst
  524.   end if
  525.   if QL=2 then
  526.     put 1 into cd fld "MultCheck"
  527.     put 0 into QLtst
  528.     put "Q2" into ComStatus
  529.     repeat with i=1 to NL
  530.       put item 1 of line i of cd fld "QuickList" into StackPath
  531.       put item 2 of line i of cd fld "QuickList" into QLSTKName
  532.       Doit
  533.       if QLtst=1 then exit repeat
  534.     end repeat
  535.     put "Finished compacting entire Quick List."
  536.   else
  537.     put "Q1" into ComStatus
  538.     put item 1 of line(QL-3) of cd fld "QuickList" into StackPath
  539.     put item 2 of line(QL-3) of cd fld "QuickList" into QLSTKName
  540.     Doit
  541.     put "Finished compacting Quick List item."
  542.   end if
  543.   put empty into StackPath
  544.   put empty into QLSTKName
  545.   put empty into QL
  546.   put empty into QLtst
  547. end ComQuickLst
  548.  
  549.  
  550.  
  551. -- part 50 (button)
  552. -- low flags: 00
  553. -- high flags: A004
  554. -- rect: left=417 top=104 right=126 bottom=508
  555. -- title width / last selected line: 0
  556. -- icon id / first selected line: 0 / 0
  557. -- text alignment: 1
  558. -- font id: 0
  559. -- text size: 12
  560. -- style flags: 0
  561. -- line height: 16
  562. -- part name: Quick List
  563. ----- HyperTalk script -----
  564. on mouseDown
  565.   global RSTK,QLvar
  566.   put empty into b
  567.   put the number of lines in cd fld "QuickList" into a
  568.   put empty into menu
  569.   if QLvar is empty then
  570.     repeat with i=1 to a
  571.       put "," & item 2 of line i of cd fld "QuickList" after QLvar
  572.     end repeat
  573.     if QLvar is empty then put ",None installed" into QLvar
  574.   end if
  575.   if QLvarΓëá",None installed" then
  576.     put ","&"-(" before b
  577.     put ","&"Delete entire list" before b
  578.     put b before menu
  579.   end if
  580.   put QLvar after menu
  581.   put return & "Delete from list" before menu
  582.   put "Add to list" before menu
  583.   Get HPopupMenu(menu,0,The MouseV-10,The MouseH-75)
  584.   set hilite of cd btn id 50 to false
  585.   if item 1 of it=1 then InstallSTK
  586.   if item 1 of it=2 then
  587.     put item 2 of it into RSTK
  588.     RemoveSTK
  589.   end if
  590. end MouseDown
  591. -------------------Install Stack into QuickList----------------------------
  592. on InstallSTK
  593.   global QLvar
  594.   put the number of lines in cd fld "QuickList" into z
  595.   put "Select the stack you wish to add to the Quick List."
  596.   Get FileName("STAK")
  597.   if it is empty then exit InstallSTK
  598.   set lockscreen to true   -----these two lines will reset the screen
  599.   set lockscreen to false  -----so that the outline disappears
  600.   if cd fld "QuickList" contains it then
  601.     put "That stack is already in the list."
  602.     wait 60 ticks
  603.     hide msg
  604.     exit InstallSTK
  605.   end if
  606.   put it into line z+1 of cd fld "QuickList"
  607.   put number of chars of it into y
  608.   repeat with i=y down to 1
  609.     if char i of it is not ":" then
  610.       put char i of it before x
  611.     else
  612.       exit repeat
  613.     end if
  614.   end repeat
  615.   put "Installing the stack:"&&x
  616.   wait 30 ticks
  617.   put ","&x after line z+1 of cd fld "QuickList"
  618.   put empty into QLvar
  619.   put "Finished installing the stack:"&&x
  620.   wait 60 ticks
  621.   hide msg
  622. end InstallSTK
  623. ---------------------Remove Stack from QuickList------------------------
  624. on RemoveSTK
  625.   global RSTK,QLvar
  626.   if RSTK=2 then
  627.     answer "Would you like to clear the entire Quick List?" with "Yes" or "Cancel"
  628.     if it="Cancel" then exit RemoveSTK
  629.     put empty into cd fld "QuickList"
  630.     put empty into QLvar
  631.     exit RemoveSTK
  632.   end if
  633.   subtract 3 from RSTK
  634.   put item 2 of line RSTK of cd fld "QuickList" into a
  635.   if a=1 then put empty into cd fld "QuickList"
  636.   put "?" after a
  637.   answer "Remove the stack:"&&a with "Remove" or "Cancel"
  638.   if it="Cancel" then exit RemoveSTK
  639.   delete line RSTK of cd fld "QuickList"
  640.   put empty into QLvar
  641.   put "Stack Removed."
  642.   wait 60 ticks
  643.   hide msg
  644. end RemoveSTK
  645.  
  646.  
  647. -- part 53 (field)
  648. -- low flags: 01
  649. -- high flags: 0007
  650. -- rect: left=352 top=67 right=283 bottom=413
  651. -- title width / last selected line: 0
  652. -- icon id / first selected line: 0 / 0
  653. -- text alignment: 0
  654. -- font id: 3
  655. -- text size: 9
  656. -- style flags: 0
  657. -- line height: 12
  658. -- part name: PERSAVED
  659.  
  660.  
  661. -- part 54 (field)
  662. -- low flags: 01
  663. -- high flags: 0002
  664. -- rect: left=352 top=52 right=67 bottom=413
  665. -- title width / last selected line: 0
  666. -- icon id / first selected line: 0 / 0
  667. -- text alignment: 1
  668. -- font id: 0
  669. -- text size: 12
  670. -- style flags: 0
  671. -- line height: 16
  672. -- part name: % SAVED
  673.  
  674.  
  675. -- part 33 (field)
  676. -- low flags: 80
  677. -- high flags: 0007
  678. -- rect: left=0 top=68 right=132 bottom=367
  679. -- title width / last selected line: 0
  680. -- icon id / first selected line: 0 / 0
  681. -- text alignment: 0
  682. -- font id: 3
  683. -- text size: 9
  684. -- style flags: 0
  685. -- line height: 12
  686. -- part name: HomeCompact¬ Script
  687.  
  688.  
  689. -- part 51 (field)
  690. -- low flags: 80
  691. -- high flags: 0007
  692. -- rect: left=1 top=132 right=205 bottom=367
  693. -- title width / last selected line: 0
  694. -- icon id / first selected line: 0 / 0
  695. -- text alignment: 0
  696. -- font id: 3
  697. -- text size: 12
  698. -- style flags: 0
  699. -- line height: 16
  700. -- part name: QuickList
  701.  
  702.  
  703. -- part 28 (button)
  704. -- low flags: 00
  705. -- high flags: 0000
  706. -- rect: left=396 top=82 right=268 bottom=413
  707. -- title width / last selected line: 0
  708. -- icon id / first selected line: 0 / 0
  709. -- text alignment: 1
  710. -- font id: 0
  711. -- text size: 12
  712. -- style flags: 0
  713. -- line height: 16
  714. -- part name: Not here
  715. ----- HyperTalk script -----
  716. on mouseDown
  717.   global cur
  718.   set lockscreen to true
  719.   set the scroll of cd fld id 4 to 0
  720.   set the scroll of cd fld id 25 to 0
  721.   set the scroll of cd fld id 53 to 0
  722.   set lockscreen to false
  723.   put 0 into cur
  724. end mouseDown
  725.  
  726.  
  727.  
  728. -- part 26 (button)
  729. -- low flags: 00
  730. -- high flags: 2000
  731. -- rect: left=396 top=67 right=83 bottom=413
  732. -- title width / last selected line: 0
  733. -- icon id / first selected line: 0 / 0
  734. -- text alignment: 1
  735. -- font id: 0
  736. -- text size: 12
  737. -- style flags: 0
  738. -- line height: 16
  739. -- part name: UP
  740. ----- HyperTalk script -----
  741. on mouseStillDown
  742.   global cur
  743.   set lockscreen to true
  744.   put SU(cur) into cur
  745.   set lockscreen to false
  746. end mouseStillDown
  747.  
  748.  
  749. -- part 49 (field)
  750. -- low flags: 81
  751. -- high flags: 0007
  752. -- rect: left=0 top=20 right=67 bottom=367
  753. -- title width / last selected line: 0
  754. -- icon id / first selected line: 0 / 0
  755. -- text alignment: 0
  756. -- font id: 3
  757. -- text size: 12
  758. -- style flags: 0
  759. -- line height: 16
  760. -- part name: Hello!
  761.  
  762.  
  763. -- part 27 (button)
  764. -- low flags: 00
  765. -- high flags: 2000
  766. -- rect: left=396 top=267 right=283 bottom=413
  767. -- title width / last selected line: 0
  768. -- icon id / first selected line: 0 / 0
  769. -- text alignment: 1
  770. -- font id: 0
  771. -- text size: 12
  772. -- style flags: 0
  773. -- line height: 16
  774. -- part name: Down
  775. ----- HyperTalk script -----
  776. on mouseStillDown
  777.   global cur
  778.   set lockscreen to true
  779.   put SD(cur) into cur
  780.   set lockscreen to false
  781. end mouseStillDown
  782.  
  783.  
  784.  
  785. -- part 55 (field)
  786. -- low flags: 01
  787. -- high flags: 0002
  788. -- rect: left=2 top=284 right=302 bottom=258
  789. -- title width / last selected line: 0
  790. -- icon id / first selected line: 0 / 0
  791. -- text alignment: 1
  792. -- font id: 0
  793. -- text size: 12
  794. -- style flags: 0
  795. -- line height: 16
  796. -- part name: 
  797.  
  798.  
  799. -- part 56 (field)
  800. -- low flags: 01
  801. -- high flags: 0000
  802. -- rect: left=460 top=325 right=339 bottom=510
  803. -- title width / last selected line: 0
  804. -- icon id / first selected line: 0 / 0
  805. -- text alignment: 0
  806. -- font id: 3
  807. -- text size: 9
  808. -- style flags: 256
  809. -- line height: 12
  810. -- part name: Wasted
  811.  
  812.  
  813. -- part 58 (field)
  814. -- low flags: 01
  815. -- high flags: 0000
  816. -- rect: left=395 top=325 right=339 bottom=461
  817. -- title width / last selected line: 0
  818. -- icon id / first selected line: 0 / 0
  819. -- text alignment: 0
  820. -- font id: 3
  821. -- text size: 9
  822. -- style flags: 256
  823. -- line height: 12
  824. -- part name: Name
  825.  
  826.  
  827. -- part 59 (field)
  828. -- low flags: 01
  829. -- high flags: 0000
  830. -- rect: left=395 top=305 right=318 bottom=463
  831. -- title width / last selected line: 0
  832. -- icon id / first selected line: 0 / 0
  833. -- text alignment: 0
  834. -- font id: 3
  835. -- text size: 9
  836. -- style flags: 256
  837. -- line height: 12
  838. -- part name: Stackname
  839.  
  840.  
  841. -- part 60 (field)
  842. -- low flags: 01
  843. -- high flags: 0000
  844. -- rect: left=460 top=305 right=318 bottom=510
  845. -- title width / last selected line: 0
  846. -- icon id / first selected line: 0 / 0
  847. -- text alignment: 0
  848. -- font id: 3
  849. -- text size: 9
  850. -- style flags: 256
  851. -- line height: 12
  852. -- part name: STSize
  853.  
  854.  
  855. -- part 38 (field)
  856. -- low flags: 81
  857. -- high flags: 0007
  858. -- rect: left=2 top=30 right=279 bottom=510
  859. -- title width / last selected line: 0
  860. -- icon id / first selected line: 0 / 0
  861. -- text alignment: 1
  862. -- font id: 3
  863. -- text size: 12
  864. -- style flags: 0
  865. -- line height: 16
  866. -- part name: Program Info
  867.  
  868.  
  869. -- part 37 (button)
  870. -- low flags: 80
  871. -- high flags: A002
  872. -- rect: left=2 top=279 right=303 bottom=510
  873. -- title width / last selected line: 0
  874. -- icon id / first selected line: 0 / 0
  875. -- text alignment: 1
  876. -- font id: 0
  877. -- text size: 12
  878. -- style flags: 0
  879. -- line height: 16
  880. -- part name: >>>CLICK HERE TO CONTINUE<<<
  881. ----- HyperTalk script -----
  882. on mouseUp
  883.   global shs
  884.   if shsΓëá"Credits" and shsΓëá"HomeCompact" then set scroll of cd fld shs to 0
  885.   hide menubar
  886.   hide msg
  887.   set lockscreen to true
  888.   hide cd fld shs
  889.   hide cd btn id 37
  890.   Unlock screen with visual effect iris close slow
  891. end mouseUp
  892.  
  893.  
  894.  
  895. -- part 36 (field)
  896. -- low flags: 81
  897. -- high flags: 0007
  898. -- rect: left=2 top=30 right=279 bottom=510
  899. -- title width / last selected line: 0
  900. -- icon id / first selected line: 0 / 0
  901. -- text alignment: 1
  902. -- font id: 3
  903. -- text size: 12
  904. -- style flags: 0
  905. -- line height: 16
  906. -- part name: Help File
  907.  
  908.  
  909. -- part 61 (field)
  910. -- low flags: 81
  911. -- high flags: 0002
  912. -- rect: left=2 top=30 right=279 bottom=510
  913. -- title width / last selected line: 0
  914. -- icon id / first selected line: 0 / 0
  915. -- text alignment: 1
  916. -- font id: 3
  917. -- text size: 9
  918. -- style flags: 0
  919. -- line height: 12
  920. -- part name: Credits
  921.  
  922.  
  923. -- part 62 (field)
  924. -- low flags: 81
  925. -- high flags: 0002
  926. -- rect: left=2 top=30 right=279 bottom=510
  927. -- title width / last selected line: 0
  928. -- icon id / first selected line: 0 / 0
  929. -- text alignment: 1
  930. -- font id: 3
  931. -- text size: 12
  932. -- style flags: 0
  933. -- line height: 16
  934. -- part name: HomeCompact
  935.  
  936.  
  937. -- part 63 (field)
  938. -- low flags: 81
  939. -- high flags: 0007
  940. -- rect: left=2 top=32 right=279 bottom=510
  941. -- title width / last selected line: 0
  942. -- icon id / first selected line: 0 / 0
  943. -- text alignment: 1
  944. -- font id: 3
  945. -- text size: 9
  946. -- style flags: 0
  947. -- line height: 12
  948. -- part name: Version History
  949.  
  950.  
  951. -- part contents for card part 21
  952. ----- text -----
  953. Copyright ┬⌐ 1989 Mark R. Elpers. All Rights Reserved.
  954. DISTRIBUTION OF THIS STACK FOR PROFIT IS STRICTLY PROHIBITED WITHOUT THE CONSENT OF THE AUTHOR.
  955.  
  956. -- part contents for card part 23
  957. ----- text -----
  958. COMPACTED STACKS                
  959.  
  960. -- part contents for card part 24
  961. ----- text -----
  962. REPORT FIELD
  963.  
  964. -- part contents for card part 15
  965. ----- text -----
  966. 0
  967.  
  968. -- part contents for card part 33
  969. ----- text -----
  970. ---QCHCStart101
  971. ---Do not remove this script. It may alter the security of the HomeStack!
  972. ---The following is a script inserted by Quick CompacterΓäó.
  973. ---Automatically compacts those stacks that need to be upon the
  974. ---closing of that stack.
  975. ---This script is part of the Quick CompacterΓäó stack package.
  976. ---Quick CompacterΓäó is Shareware.
  977. ---HomeCompactΓäó Script v1.0.1
  978.  
  979. on MouseStillDown
  980.   if the commandKey is down and the shiftKey is down
  981.   then
  982.     set lockmessages to true
  983.     if msg is empty then put empty into z else put msg into z
  984.     put the freesize of this stack into b
  985.     if b>0 then
  986.       put "Compacting " before a
  987.       put "HomeCompactΓäó report: " before a
  988.       put b after a
  989.       put " bytes in this stack." after a
  990.       put a into message box
  991.       domenu "Compact Stack"
  992.       put "HomeCompactΓäó report: Compaction complete. " into c
  993.       put b after c
  994.       put " bytes saved." after c
  995.       put c into message box
  996.     else
  997.       put "HomeCompactΓäó report: This stack does not need to be compacted."
  998.     end if
  999.     wait 120 ticks
  1000.     put z into msg
  1001.     hide msg box
  1002.     set lockMessages to false
  1003.   end if
  1004. end MouseStillDown
  1005. ---QCHCEnd
  1006.  
  1007.  
  1008. -- part contents for card part 35
  1009. ----- text -----
  1010. 0
  1011.  
  1012. -- part contents for card part 36
  1013. ----- text -----
  1014. Quick CompacterΓäó Help File
  1015. *************************************************************
  1016. Compact: One Stack
  1017. Selecting this option allows you to choose a HyperCard stack that will automatically be compacted, if needed. The file name, the amount of bytes saved and the percent of bytes saved will be displayed in the Report fields and the bytes saved amount will be added to the Total Bytes Saved field. 
  1018.  
  1019. Compact: Multiple Stacks
  1020. Selecting this option allows you to compact a large number of stacks without choosing Compact: One Stack each time. Press the 'Cancel' button on any of the file selection dialog boxes to end this procedure.
  1021.  
  1022. Compact: Entire Folder
  1023. Selecting this option allows you to compact all the stacks in a given folder. A standard dialog box will appear, navigate to the desired folder, choose a stack and all the rest of the stacks in that folder will be compacted.
  1024. This option only compacts the stacks which are resident to that folder. It will not compact the stacks in a folder within the selected folder.
  1025.  
  1026. Compact: Quick List
  1027. Selecting this option will allow you to either: 1) compact all the files displayed in the Quick ListΓäó, or, 2) compact a single file on the Quick ListΓäó. 
  1028. Note: if you attempt to compact a stack in the Quick ListΓäó that no longer exists or has been moved since added to the Quick ListΓäó, you will receive an error message. Delete that stack from the Quick ListΓäó and add it again.
  1029. ******See Quick List: below for more information******
  1030. ************************
  1031. Options: Go Home
  1032. Selecting this option takes you to the home stack. This option will compact the Quick CompacterΓäó stack if necessary.
  1033.  
  1034. Options: Go to Finder
  1035. Selecting this option quits HyperCard and take you to the Finder. This option  compacts the Quick CompacterΓäó stack if necessary.
  1036.  
  1037. Options: Open Stack...
  1038. Selecting this option allows you to select a stack to open, then takes you to that stack. This option compacts the Quick CompacterΓäó stack if necessary.
  1039.  
  1040. Options: Transfer...
  1041. Selecting this option allow you to select an application to open, then takes you to that application. Upon quiting that application, you return to HyperCard. This option compacts the Quick CompacterΓäó stack if necessary.
  1042.  
  1043. Options: Compact this Stack
  1044. Selecting this option automatically compacts the Quick CompacterΓäó stack if necessary.
  1045.  
  1046. Options: Clear Report Field
  1047. Selecting this option clears the Compacted Stack, Bytes Saved, % Saved and Total Bytes Saved fields. You will also be asked each time you open Quick CompacterΓäó if you want these fields cleared.
  1048.  
  1049. Options: Insert HomeCompact Script
  1050. Selecting this option installs the HomeCompactΓäó script in your Home Stack. If the HomeCompactΓäó script is already installed, it will check the version number and if necessary ask you to update it.
  1051. ****See Help: HomeCompact Script for more info****
  1052.  
  1053. Options: Remove HomeCompact Script
  1054. This removes the HomeCompactΓäó Script from your Home stack.
  1055. ************************
  1056. Help: Program Info
  1057. Displays information on this stack.
  1058.  
  1059. Help: Help File
  1060. Displays this field.
  1061.  
  1062. Help: Credits
  1063. Displays the XFCN credits and program credits.
  1064.  
  1065. Help: HomeCompact Script
  1066. Displays information about HomeCompact.
  1067. ************************
  1068. Quick List: Add to List
  1069. Selecting this option allows you to choose a stack to add to the Quick ListΓäó. You can not add the same file to the Quick ListΓäó twice.
  1070.  
  1071. Quick List: Delete from List
  1072. Selecting this option allows you to either, 1) remove all stacks from the Quick ListΓäó, or, 2) remove a single stack from the Quick ListΓäó.
  1073. ************************
  1074. Known problems
  1075. If there is problem with the target stack. For example, if the 
  1076. target stack has been corrupted (bad background, etc.) .
  1077. If the version of HyperCard which is running is incompatible with the version under which the target stack was created you will be sent back to the finder.
  1078. If there is not enough disk space for HyperCard to compact 
  1079. the target stack you will receive an error message.
  1080. I am working on these problems. If you have any suggestions to solve them 
  1081. or have general suggestions please contact me at the addresses on the 
  1082. Program Info card.
  1083. *************************************************************
  1084. THIS IS NOT A COMPLETE LIST OF PROBLEMS. 
  1085. USE THIS STACK AT YOUR OWN RISK!
  1086.  
  1087. -- part contents for card part 38
  1088. ----- text -----
  1089. Quick CompacterΓäó Program Info
  1090. *************************************************************
  1091. This was written to compact stacks easily and quickly from a base stack. It came to my attention that a major portion of my hard drive was being used to store stacks that had a large amount of wasted space. By running this stack, you can free hundreds of kilobytes held captive by your stacks. I am always trying to improve this program, so if you find a problem with this stack, or have an idea to make it better, please tell me and I will try to put it in a future version. All I ask is that you send a small shareware fee            ($10). In lieu of the fee you can send me an original stack that you have created. I will keep a record of those who have registered and send them upgrade information when I complete the next version.
  1092. Please Send To:
  1093. Mark Elpers
  1094. 13000 Skyline
  1095. Woodside, CA 94062
  1096. or 
  1097. leave a message on GEnie to: M.Elpers
  1098. or 
  1099. on Bitnet to: GPR001Y@CALSTATE.EDU
  1100.  
  1101. Author's note:
  1102. Some people may consider this stack overkill for compacting a stack, but I had a great time writing it and learned a lot. Anyway, if you can get some use out of it, then it was worth the effort. MRE
  1103.  
  1104. Quick CompacterΓäó, Quick ListΓäó and HomeCompactΓäó are trademarks. All rights reserved by Mark Richard Elpers.
  1105.  
  1106. -- part contents for card part 39
  1107. ----- text -----
  1108. BYTES SAVED            
  1109.  
  1110. -- part contents for card part 54
  1111. ----- text -----
  1112. % SAVED
  1113.  
  1114. -- part contents for card part 55
  1115. ----- text -----
  1116. Total Bytes Saved:
  1117.  
  1118. -- part contents for background part 5
  1119. ----- text -----
  1120. V. 1.0.2
  1121.  
  1122. -- part contents for card part 58
  1123. ----- text -----
  1124. FreeSpace:
  1125.  
  1126. -- part contents for card part 56
  1127. ----- text -----
  1128. 0
  1129.  
  1130. -- part contents for card part 59
  1131. ----- text -----
  1132. Q.C. Size :
  1133.  
  1134. -- part contents for card part 60
  1135. ----- text -----
  1136. 57452
  1137.  
  1138. -- part contents for card part 61
  1139. ----- text -----
  1140. Quick CompacterΓäó Credits
  1141. *************************************************************
  1142. Credits for use of XFNC's
  1143. Files XFCN and Hpopupmenu XFCN ┬⌐1988-89 by Guy de Picciotto, its author. All rights reserved
  1144. WritePermission XFCN ┬⌐1989 by the Trustees of Dartmouth College
  1145. DoRestart XCMD and DoShutdown XCMD by Earle R. Horton
  1146. Developed with the aid of the Developer Stack. To receive the latest version of the 
  1147. Developer Stack, send $5 to: Steve Drazga Box 388 Southampton, PA  18966
  1148. SU XFCN and SD XFCN ┬⌐1989 by Mark Richard Elpers.
  1149. *************************************************************
  1150. Quick CompacterΓäó written by
  1151. Mark R. Elpers
  1152. 13000 Skyline Blvd
  1153. Woodside, CA 95521
  1154.  
  1155. Genie: M. Elpers
  1156. Bitnet: GPR001Y@CALSTATE.CCS.EDU
  1157.  
  1158. -- part contents for card part 62
  1159. ----- text -----
  1160. HomeCompactΓäó Help
  1161. **************************************************************
  1162. HomeCompactΓäó allows for easy compaction of a stack from within that stack. After installing the HomeCompactΓäó script in your Home stack, you can compact any stack by holding the <Shift> and <Command> keys and clicking the mouse button. Try to click the mouse button in an empty space on the card. The stack will automatically be compacted and the results shown in the message box.
  1163. Currently, the HomeCompactΓäó script does not check for locked stacks, and will not be able to compact a locked stack. So please don't try, the results could be disastrous! If I figure out how to check for a locked stack I will implement it in a later version of Quick CompacterΓäó.
  1164.  
  1165. -- part contents for card part 63
  1166. ----- text -----
  1167. Quick CompacterΓäó Version History
  1168. **********************************************************************
  1169. Version 1.0b1
  1170. First beta-version released
  1171. **********************************************************************
  1172. Version 1.0b9
  1173. Last Beta verion released
  1174.  Removed various bugs
  1175.  Used XCMD's to scroll fields
  1176.  Slightly faster through compression of scripts
  1177. **********************************************************************
  1178. Version 1.0
  1179. First finished version released
  1180.  Included HomeCompactΓäó script for first time
  1181.  Better user Interface
  1182.  Removed print field button (never implemented)
  1183. Removed various minor bugs
  1184.  Moved Help fields to main card
  1185. **********************************************************************
  1186. Version 1.0.2 (11-17-89)
  1187.  Greatly enhanced user interface
  1188.  Incorporated PopUpMenus on Main Card
  1189.  Added Compact entire folder
  1190.  Added Quick ListΓäó Compaction Feature
  1191. Removed display of target stack during compaction (for greater speed)
  1192. Upgraded HomeCompactΓäó script
  1193. Added Remove HomeCompactΓäó script
  1194. Included percentage saved from compacted stack
  1195.  Added check for locked stacks
  1196.  Added check for nonexistent stacks (for QL)
  1197.  Added Restart and Shut Down to Menu
  1198. Added title bar to Main Card
  1199. Added Quick CompacterΓäó size and Freespace
  1200. Added HomeCompactΓäó Help file
  1201. Added Credit file
  1202. Added Version History file
  1203. Increased Report field size
  1204. Reduced font size of Report field
  1205. **********************************************************************
  1206. Future Version *MAY* include:
  1207. Ability to print and save the report fields
  1208. File Tools (Copy, Delete, Move, Rename Stacks)
  1209. Button to paste to Home stack for easier navigation
  1210. New Record field of stacks progress (Time, action etc.)
  1211. Make sure there is enough space to compact stack on the disk
  1212. Show stack info (size, freespace etc.) before compaction
  1213. Options or Preference window with:
  1214. 1. Ability to go to stack to see compaction
  1215. 2. Ability to change font and size in report fields
  1216. 3. Ability add every stack compacted to Quick ListΓäó
  1217. 4. Ability to change visual effects
  1218. Quick ListΓäó changes:
  1219. 1. Ability to add entire folder to Quick ListΓäó
  1220. 2. Quick ListΓäó info in variable for quicker retrieval